package com.gang.ssm.bos.system.mapper;


import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.gang.ssm.bos.system.bean.Role;
import com.gang.ssm.bos.system.bean.RoleExample;

public interface RoleMapper {
    long countByExample(RoleExample example);

    int deleteByExample(RoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    List<Role> selectByExample(RoleExample example);

    Role selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

	List<Integer> findIdListByUserId(Integer id);
	
	List<String> findNameByUserId(Integer userId);

	List<Role> findByLimit(@Param("pageNo")int pageNo, @Param("pageSize")int pageSize);

	void deleteRoleMenuByRoleId(Integer roleId);

	void insertRoleAndMenu(@Param("id")Integer id, @Param("idList")List<Integer> idList);

	String findRoleCodeByRoleId(Integer roleId);
}